#include "project_shared.h"

// NOTE:  Touch this file (update timestamp) in order for other cpps to pick up changes
/*
  Enhancements/differences from U++'s Util.cpp version:
  - Vector map is exposed to rest of library so it can be written out
  - Multiple config files per app: C:\Users\Jeff\jammit\MainWin.ini, AboutWin
    This is because for performance, only one needs to be loaded immediately
  - Save outside exe folder since U++ zaps on upgrade.  Try to save to User folder
  - Can set/add new keys
  - No way to control placement of ini file, goes in homedirectory always (which includes user name)
  - I don't use serialization for 2 reasons: User can edit it themselves, and upgrades are much easier; they don't lose settings every upgrade
  - Dectect sections? [section] Merge dup sections?
  - Detect comments?
  - Track reads, changes, keep notes in ini file
  - Save space, etct
  - Templates?  Can warn on missing values, like positioning: X,Y,W,H,Fore/Back,Min/Max/Norm
  - INI files are at least cross-platform, so that's nice
  - XML could store rows and support DTDs, URL DTDs even!
  - Use DOM to read?  XML supports comments, and they would be saved.
  - Nice feature of Tagging in XML: Doesn't matter what level it is; it finds it; creates looser coupling
*/
#include <CtrlLib/CtrlLib.h>
 
using namespace Upp;

#include "image_shared.h"  // This is just an example of how to use a shared image iml.  The iml_source.h can only be one file, so I put it here.
#include <Draw/iml_source.h> 

StaticMutex sMtx;

// Exposed in header
//Timer &timer = Timer();

// Wish it did a trace
void MyErr(String msg, char const *file, long line, char const *functionname) {
	// Logs in release, too.  Errors are hardest to track in release.
	RLOG(String().Cat() << msg << " in " << file << ", @" << line << ", func:" << functionname);
	Exclamation(String().Cat() << "Error:" << msg);
}

// TODO: Load extraneous data; comments, non-key pairs, comments after

/*
String SetModuleIniKey(const char *modTag, const char *id) {
	LoadModuleIniFile(modTag);
}

void FlushToIniFile() {
	
}

*/
